﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Npgsql;

namespace frmPrincipal
{
    class StandardDBConnection
    {
        public NpgsqlConnection cnn;
        private string servidor= "localhost";
        private string usuario = "postgres";
        private string pw = "ifsp";
        private string porta = "5432";
        private string bd = "sgi";
        private string conex;

        public StandardDBConnection(){
            servidor= "localhost";
            usuario = "postgres";
            pw = "ifsp";
            porta = "5432";
            bd = "sgi";
            conex = string.Format("Server={0}; Port={1}; User ID={2}; Password={3}; Database={4}", servidor, porta, usuario, pw, bd);

            cnn = new NpgsqlConnection(conex);
            cnn.Open();
        }
        
    }
}
